# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test14
# Description:  例23.14
# Author:       ASUS
# Date:         2019/4/7
#-------------------------------------------------------------------------------


from numpy import *
#计算元素个数为偶数的数组的中位数
a = array([4,2,1,5])
print(median(a))
#计算元素个数为奇数的数组的中位数
b = array([4,2,1])
print(median(b))
price = loadtxt("data.csv",delimiter=",",usecols=(6))
print(price)
print(median(price))
#计算方差
print("方差","=",var(price))



